package com.easymin.weixin.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 抢单记录
 *
 * @author Administrator
 */
public class OrderGrab implements Serializable {
  private Long id;

  private Long orderId; // 被抢单订单Id

  private String orderNo; // 被抢单的订单号

  private Date created; // 抢单时间

  private Date updated;

  private Boolean success; // 抢单是否成功true:成功,false:失败

  private Long employId; // 服务人员Id

  private String employName; // 服务人员名字

  private String employPhone; // 服务人员电话

  private Long employCompanyId;// 服务人员所属公司

  private Integer orderNumber;// 司机已有订单数

  private Double distance; // 临时存储订单交付地与司机距离

  private String appKey;

  private static final long serialVersionUID = 1L;


  public Long getEmployCompanyId() {
    return employCompanyId;
  }

  public void setEmployCompanyId(Long employCompanyId) {
    this.employCompanyId = employCompanyId;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Long getOrderId() {
    return orderId;
  }

  public void setOrderId(Long orderId) {
    this.orderId = orderId;
  }

  public String getOrderNo() {
    return orderNo;
  }

  public void setOrderNo(String orderNo) {
    this.orderNo = orderNo == null ? null : orderNo.trim();
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Boolean getSuccess() {
    return success;
  }

  public void setSuccess(Boolean success) {
    this.success = success;
  }

  public Long getEmployId() {
    return employId;
  }

  public void setEmployId(Long employId) {
    this.employId = employId;
  }

  public String getEmployName() {
    return employName;
  }

  public void setEmployName(String employName) {
    this.employName = employName == null ? null : employName.trim();
  }

  public String getEmployPhone() {
    return employPhone;
  }

  public void setEmployPhone(String employPhone) {
    this.employPhone = employPhone == null ? null : employPhone.trim();
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey == null ? null : appKey.trim();
  }

  public Integer getOrderNumber() {
    return orderNumber;
  }

  public void setOrderNumber(Integer orderNumber) {
    this.orderNumber = orderNumber;
  }

  public Double getDistance() {
    return distance;
  }

  public void setDistance(Double distance) {
    this.distance = distance;
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    OrderGrab other = (OrderGrab) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(
            other.getOrderId()))
        && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(
            other.getOrderNo()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getSuccess() == null ? other.getSuccess() == null : this.getSuccess().equals(
            other.getSuccess()))
        && (this.getEmployId() == null ? other.getEmployId() == null : this.getEmployId().equals(
            other.getEmployId()))
        && (this.getEmployName() == null ? other.getEmployName() == null : this.getEmployName()
            .equals(other.getEmployName()))
        && (this.getEmployPhone() == null ? other.getEmployPhone() == null : this.getEmployPhone()
            .equals(other.getEmployPhone()))
        && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(
            other.getAppKey()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
    result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getSuccess() == null) ? 0 : getSuccess().hashCode());
    result = prime * result + ((getEmployId() == null) ? 0 : getEmployId().hashCode());
    result = prime * result + ((getEmployName() == null) ? 0 : getEmployName().hashCode());
    result = prime * result + ((getEmployPhone() == null) ? 0 : getEmployPhone().hashCode());
    result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append(" [");
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", orderId=").append(orderId);
    sb.append(", orderNo=").append(orderNo);
    sb.append(", created=").append(created);
    sb.append(", updated=").append(updated);
    sb.append(", success=").append(success);
    sb.append(", employId=").append(employId);
    sb.append(", employName=").append(employName);
    sb.append(", employPhone=").append(employPhone);
    sb.append(", appKey=").append(appKey);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append("]");
    return sb.toString();
  }
}
